// 证书模板数据结构
export const certificateTemplateStructure = {
    // 基础信息（来自第一步）
    basicInfo: {
        name: '',
        trainingProjectId: '',
        backgroundImage: ''
    },
    // 字段信息
    fields: {
        // 必选字段（来自第一步选择）
        requiredFields: [],
        // 可选字段（在第二步中让用户选择是否展示）
        optionalFields: [
            {
                label: "姓名",
                value: "name",
                selected: true,
                style: {
                    fontFamily: "SimHei",
                    fontSize: "18",
                    color: "#000000",
                    italic: false,
                    underline: false,
                    strikethrough: false,
                    alignment: "center",
                    letterSpacing: 0,
                    lineHeight: 1.2,
                    verticalAlign: "baseline"
                }
            },
            {
                label: "证件编号",
                value: "idNumber",
                selected: true,
                style: {
                    fontFamily: "SimHei",
                    fontSize: "18",
                    color: "#000000",
                    italic: false,
                    underline: false,
                    strikethrough: false,
                    alignment: "center",
                    letterSpacing: 0,
                    lineHeight: 1.2,
                    verticalAlign: "baseline"
                }
            },
            {
                label: "培训项目",
                value: "trainingProject",
                selected: true,
                style: {
                    fontFamily: "SimHei",
                    fontSize: "18",
                    color: "#000000",
                    italic: false,
                    underline: false,
                    strikethrough: false,
                    alignment: "center",
                    letterSpacing: 0,
                    lineHeight: 1.2,
                    verticalAlign: "baseline"
                }
            },
            {
                label: "有效年限",
                value: "validYears",
                selected: false,
                style: {
                    fontFamily: "SimHei",
                    fontSize: "18",
                    color: "#000000",
                    italic: false,
                    underline: false,
                    strikethrough: false,
                    alignment: "center",
                    letterSpacing: 0,
                    lineHeight: 1.2,
                    verticalAlign: "baseline"
                }
            },
            {
                label: "发证日期",
                value: "issueDate",
                selected: false,
                style: {
                    fontFamily: "SimHei",
                    fontSize: "18",
                    color: "#000000",
                    italic: false,
                    underline: false,
                    strikethrough: false,
                    alignment: "center",
                    letterSpacing: 0,
                    lineHeight: 1.2,
                    verticalAlign: "baseline"
                }
            },
            {
                label: "起始有效期",
                value: "startDate",
                selected: false,
                style: {
                    fontFamily: "SimHei",
                    fontSize: "18",
                    color: "#000000",
                    italic: false,
                    underline: false,
                    strikethrough: false,
                    alignment: "center",
                    letterSpacing: 0,
                    lineHeight: 1.2,
                    verticalAlign: "baseline"
                }
            },
            {
                label: "截止有效期",
                value: "endDate",
                selected: false,
                style: {
                    fontFamily: "SimHei",
                    fontSize: "18",
                    color: "#000000",
                    italic: false,
                    underline: false,
                    strikethrough: false,
                    alignment: "center",
                    letterSpacing: 0,
                    lineHeight: 1.2,
                    verticalAlign: "baseline"
                }
            }
        ],
        // 用户自定义字段
        customFields: []
    },
    // 全局格式设置（仅保留背景色、边框色等）
    format: {
        backgroundColor: "#007aff",
        borderColor: "#dcdfe6"
    }
};

// 创建初始模板数据的辅助函数
export function createInitialTemplateData() {
    return JSON.parse(JSON.stringify(certificateTemplateStructure));
}